#ifndef _DRIVER_I2C2_H_
#define _DRIVER_I2C2_H_

#include "stm32f10x.h"

#define ACK  0
#define NACK 1

#define SCL_HIGH (GPIOB->ODR |= GPIO_ODR_ODR10)
#define SDA_HIGH (GPIOB->ODR |= GPIO_ODR_ODR11)

void Driver_I2C2_Init(void);

uint8_t Driver_I2C2_Start(void);

void Driver_I2C2_Stop(void);

void Driver_I2C2_SendACk(void);

void Driver_I2C2_SendNACK(void);

uint8_t Driver_I2C2_SendAddr(uint8_t addr);

uint8_t Driver_I2C2_SendByte(u8 byte);

uint8_t Driver_I2C2_ReadByte();

#endif // _DRIVER_I2C2_H_